package com.ncsc.lmis.model;
// Generated Feb 25, 2014 11:44:39 PM by Hibernate Tools 3.4.0.CR1


import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * SaleLoanContractDebtMoratorium generated by hbm2java
 */
@Entity
@Table(name="sale_loan_contract_debt_moratorium"
    ,catalog="lmis"
)
public class SaleLoanContractDebtMoratorium  implements java.io.Serializable {


     private SaleLoanContractDebtMoratoriumId id;
     private SaleLoanContract saleLoanContract;
     private Short startTermNo;
     private Short startTermSubNo;
     private Short countOfTerm;
     private Short debtMoratoriumByEmpNo;
     private Date debtMoratoriumDtm;

    public SaleLoanContractDebtMoratorium() {
    }

	
    public SaleLoanContractDebtMoratorium(SaleLoanContractDebtMoratoriumId id, SaleLoanContract saleLoanContract) {
        this.id = id;
        this.saleLoanContract = saleLoanContract;
    }
    public SaleLoanContractDebtMoratorium(SaleLoanContractDebtMoratoriumId id, SaleLoanContract saleLoanContract, Short startTermNo, Short startTermSubNo, Short countOfTerm, Short debtMoratoriumByEmpNo, Date debtMoratoriumDtm) {
       this.id = id;
       this.saleLoanContract = saleLoanContract;
       this.startTermNo = startTermNo;
       this.startTermSubNo = startTermSubNo;
       this.countOfTerm = countOfTerm;
       this.debtMoratoriumByEmpNo = debtMoratoriumByEmpNo;
       this.debtMoratoriumDtm = debtMoratoriumDtm;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="contractRecNo", column=@Column(name="CONTRACT_REC_NO", nullable=false) ), 
        @AttributeOverride(name="paymentTypeNo", column=@Column(name="PAYMENT_TYPE_NO", nullable=false) ) } )
    public SaleLoanContractDebtMoratoriumId getId() {
        return this.id;
    }
    
    public void setId(SaleLoanContractDebtMoratoriumId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="CONTRACT_REC_NO", nullable=false, insertable=false, updatable=false)
    public SaleLoanContract getSaleLoanContract() {
        return this.saleLoanContract;
    }
    
    public void setSaleLoanContract(SaleLoanContract saleLoanContract) {
        this.saleLoanContract = saleLoanContract;
    }

    
    @Column(name="START_TERM_NO")
    public Short getStartTermNo() {
        return this.startTermNo;
    }
    
    public void setStartTermNo(Short startTermNo) {
        this.startTermNo = startTermNo;
    }

    
    @Column(name="START_TERM_SUB_NO")
    public Short getStartTermSubNo() {
        return this.startTermSubNo;
    }
    
    public void setStartTermSubNo(Short startTermSubNo) {
        this.startTermSubNo = startTermSubNo;
    }

    
    @Column(name="COUNT_OF_TERM")
    public Short getCountOfTerm() {
        return this.countOfTerm;
    }
    
    public void setCountOfTerm(Short countOfTerm) {
        this.countOfTerm = countOfTerm;
    }

    
    @Column(name="DEBT_MORATORIUM_BY_EMP_NO")
    public Short getDebtMoratoriumByEmpNo() {
        return this.debtMoratoriumByEmpNo;
    }
    
    public void setDebtMoratoriumByEmpNo(Short debtMoratoriumByEmpNo) {
        this.debtMoratoriumByEmpNo = debtMoratoriumByEmpNo;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="DEBT_MORATORIUM_DTM", length=19)
    public Date getDebtMoratoriumDtm() {
        return this.debtMoratoriumDtm;
    }
    
    public void setDebtMoratoriumDtm(Date debtMoratoriumDtm) {
        this.debtMoratoriumDtm = debtMoratoriumDtm;
    }




}


